package com.jy.rhin.application.enums;

/**
 * @Description:
 * @Author: lww
 * @Date: 2022/5/25 13:45
 */
public enum DocumentTypeEnum implements BaseEnum{
    /**
     * 文档类型
     */
    HEALTH_INFORMATION_REGISTRATION("health_information_registration", "个人基本健康信息登记"),
    MEDICAL_CERTIFICATE_OF_BIRTH("medical_certificate_of_birth", "出生医学证明"),
    NEWBORN_HOME_VISITS("newborn_home_visits", "新生儿家庭访视"),
    CHILD_HEALTH_EXAMINATION("child_health_examination", "儿童健康体检"),
    FIRST_PRENATAL_FOLLOW_UP_SERVICE("first_prenatal_follow_up_service", "首次产前随访服务"),
    PRENATAL_FOLLOW_UP_SERVICE("Prenatal_Follow_up_service", "产前随访服务"),
    POSTPARTUM_VISIT("postpartum_visit", "产后访视"),
    HEALTH_CHECK_UP_AT_42_DAYS_POSTPARTUM("health_check_up_at_42_days_postpartum", "产后42天健康检查"),
    VACCINATION_REPORT("vaccination_report", "预防接种报告"),
    INFECTIOUS_DISEASE_REPORT("infectious_disease_report", "传染病报告"),
    MEDICAL_CERTIFICATE_OF_DEATH("medical_certificate_of_death", "死亡医学证明"),
    FOLLOW_UP_SERVICES_HYPERTENSION("follow_up_services_hypertension", "高血压患者随访服务"),
    FOLLOW_UP_SERVICES_TYPE_2_DIABETES("follow_up_services_type_2_diabetes", "2型糖尿病患者随访服务"),
    REGISTRATION_OF_DISEASE_PATIENT_INFORMATION("registration_of_disease_patient_information", "重性精神病患者个人信息登记"),
    FOLLOW_UP_SERVICES_SEVERE_PSYCHOSIS("follow_up_services_severe_psychosis", "重性精神病患者随访服务"),
    ADULT_PHYSICAL_EXAMINATION("adult_physical_examination", "成人健康体检"),
    OUTPATIENT_SERVICE_IN_THIS_PAPER("outpatient_service_in_this_paper", "门诊摘要"),
    PAPER_HOSPITAL("paper_hospital", "住院摘要"),
    CONSULTATION_RECORD("consultation_record", "会诊记录"),
    REFERRAL_HOSPITAL_RECORDS("referral_hospital_records", "转诊(院)记录"),
    ;
    private String code;
    private String name;


    DocumentTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getName() {
        return name;
    }

    public static DocumentTypeEnum lookup(String name) {
        if (name == null || "".equals(name)) {
            return null;
        }
        for (DocumentTypeEnum value : values()) {
            if (value.name.equals(name)) {
                return value;
            }
        }
        return null;
    }
}
